package com.ssy.lingxi.purchase.controller.inner;

import com.ssy.lingxi.common.controller.BaseController;
import com.ssy.lingxi.common.response.Wrapper;
import com.ssy.lingxi.purchase.api.dto.request.UpdateCreditPointRequest;
import com.ssy.lingxi.purchase.service.inner.PurchaseInnerService;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;

/**
 * @menu 采购询价、采购招标、采购竞价 - 内部接口
 * @author fhj
 * @version 2.0.0
 * @date 2021/07/09
 */
@RestController
@RequestMapping("/purchase/inner/purchaseInner")
public class PurchaseInnerController extends BaseController {

    @Resource
    private PurchaseInnerService purchaseInnerService;

    @ApiOperation(value = "根据会员ID和角色ID更新信用分")
    @PostMapping("/updateCreditPoint")
    Wrapper<?> updateCreditPoint(@RequestBody @Valid UpdateCreditPointRequest request) {
        return purchaseInnerService.updateCreditPoint(request);
    }
}
